﻿using System.Collections.Generic;
using System.Linq;
using GuRenFang.Service.Entity;
using GuRenFang.Service.IDa;

namespace GuRenFang.Da
{
   public class ContentInfoRepository : RepositoryBase<ContentInfo>, IContentInfoRepository
    {
       public ContentInfoRepository(IDatabaseFactory databaseFactory)
            : base(databaseFactory)
         {

         }
       public TipsInfo GetTipsInfo()
       {
           return DataContext.ContentInfos.OfType<TipsInfo>().FirstOrDefault();
       }

       public CompanyInfo GetCompanyInfo()
       {
           return DataContext.ContentInfos.OfType<CompanyInfo>().FirstOrDefault();
       }
    }
}
